package com.zj.android.model

import android.app.Application
import android.view.View
import androidx.annotation.NonNull
import androidx.navigation.findNavController
import com.zj.android.fragment.BlankFragmentDirections
import com.zj.common.livedata.SingleLiveEvent
import com.zj.common.viewmodel.BaseViewModel

class BlankViewModel(@NonNull application: Application) : BaseViewModel(application) {

    val strLiveData:SingleLiveEvent<String> by lazy {
        SingleLiveEvent()
    }

    val goOther: View.OnClickListener
        get() {
            return View.OnClickListener {
                val action =
                    BlankFragmentDirections.actionPlaceholderToOtherFragment()
                it.findNavController().navigate(action)
            }
        }


    val setData: View.OnClickListener
        get() = View.OnClickListener {
            strLiveData.value="aaaaaaaaaa"
        }
}